package com.mengtian_tech.smart_lab.entity.apply;

import java.beans.Transient;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

import com.mengtian_tech.smart_lab.entity.ApplyState;
import com.mengtian_tech.smart_lab.entity.ServiceType;
import com.mengtian_tech.smart_lab.entity.system.TSUser;

/**
 * 报税单
 */
@Entity
@Table(name = "apply_form", schema = "")
public class ApplyForm implements java.io.Serializable {
 	private static final long serialVersionUID = 3299298511839045238L;
	
	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name ="ID",nullable=false,length=36)
	private String id;
	
 	//申请时间
	@Column(name="applyDate")
	private Date applyDate;

	//申请人用户id
	@ManyToOne
	@JoinColumn(name="apply_user_id")
	private TSUser applyUser;
	//审核人id
	@ManyToOne
	@JoinColumn(name="auth_user_id")
	private TSUser authUser;
	//审核时间
	@Column(name="authDate")
	private Date authDate;
 
	@Enumerated(EnumType.ORDINAL)
	@Column(name="apply_state")
	private ApplyState state;
 
	@Enumerated(EnumType.ORDINAL)
	@Column(name="service_type")
 	private ServiceType servieType;

	@Column(name="begin")
	private Date begin;
	
	@Column(name="end")
	private Date end;
	
	/** 销售额  */
	@Column(name="sell_amount")
	private BigDecimal sellAmount; 
	
	@Column(name="sell_amount_change")
	private BigDecimal sellAmountChange; 
	
	/** 开支  */
	@Column(name="spend_amount")
	private BigDecimal spendAmount;
	
	@Column(name="spend_amount_change")
	private BigDecimal spendAmountChange;
	
	
	/** 销售额增值税 */
	@Column(name="sell_amount_tax")
	private BigDecimal sellAmountTax;
	
	private BigDecimal sellAmountTaxChange; 
	
	/** 开支增值税  */
	@Column(name="spend_amount_tax")
	private BigDecimal spendAmountTax;
	
	private BigDecimal spendAmountTaxChange;
	
	
	/**
	 * 余额，利润
	 */
	@Column(name="balance")
	private BigDecimal balance;
	
	private BigDecimal balanceChange;
	
	@Column(name="sign_attach_id")
	private Long signAttachId;


	@javax.persistence.Transient
	private byte[] attachData;
	
	
	public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}


	public Date getApplyDate() {
		return applyDate;
	}


	public void setApplyDate(Date applyDate) {
		this.applyDate = applyDate;
	}


	public TSUser getApplyUser() {
		return applyUser;
	}


	public void setApplyUser(TSUser applyUser) {
		this.applyUser = applyUser;
	}


	public TSUser getAuthUser() {
		return authUser;
	}


	public void setAuthUser(TSUser authUser) {
		this.authUser = authUser;
	}


	public Date getAuthDate() {
		return authDate;
	}


	public void setAuthDate(Date authDate) {
		this.authDate = authDate;
	}


	public ApplyState getState() {
		return state;
	}


	public void setState(ApplyState state) {
		this.state = state;
	}


	public ServiceType getServieType() {
		return servieType;
	}


	public void setServieType(ServiceType servieType) {
		this.servieType = servieType;
	}


	public Date getBegin() {
		return begin;
	}


	public void setBegin(Date begin) {
		this.begin = begin;
	}


	public Date getEnd() {
		return end;
	}


	public void setEnd(Date end) {
		this.end = end;
	}


	public BigDecimal getSellAmount() {
		return sellAmount;
	}


	public void setSellAmount(BigDecimal sellAmount) {
		this.sellAmount = sellAmount;
	}


	public BigDecimal getSpendAmount() {
		return spendAmount;
	}


	public void setSpendAmount(BigDecimal spendAmount) {
		this.spendAmount = spendAmount;
	}


	public BigDecimal getSellAmountTax() {
		return sellAmountTax;
	}


	public void setSellAmountTax(BigDecimal sellAmountTax) {
		this.sellAmountTax = sellAmountTax;
	}


	public BigDecimal getSpendAmountTax() {
		return spendAmountTax;
	}


	public void setSpendAmountTax(BigDecimal spendAmountTax) {
		this.spendAmountTax = spendAmountTax;
	}


	public BigDecimal getBalance() {
		return balance;
	}


	public void setBalance(BigDecimal balance) {
		this.balance = balance;
	}


	public Long getSignAttachId() {
		return signAttachId;
	}


	public void setSignAttachId(Long signAttachId) {
		this.signAttachId = signAttachId;
	}


	public BigDecimal getSellAmountChange() {
		return sellAmountChange;
	}


	public void setSellAmountChange(BigDecimal sellAmountChange) {
		this.sellAmountChange = sellAmountChange;
	}


	public BigDecimal getSpendAmountChange() {
		return spendAmountChange;
	}


	public void setSpendAmountChange(BigDecimal spendAmountChange) {
		this.spendAmountChange = spendAmountChange;
	}


	public BigDecimal getSellAmountTaxChange() {
		return sellAmountTaxChange;
	}


	public void setSellAmountTaxChange(BigDecimal sellAmountTaxChange) {
		this.sellAmountTaxChange = sellAmountTaxChange;
	}


	public BigDecimal getSpendAmountTaxChange() {
		return spendAmountTaxChange;
	}


	public void setSpendAmountTaxChange(BigDecimal spendAmountTaxChange) {
		this.spendAmountTaxChange = spendAmountTaxChange;
	}


	public BigDecimal getBalanceChange() {
		return balanceChange;
	}


	public void setBalanceChange(BigDecimal balanceChange) {
		this.balanceChange = balanceChange;
	}


	public byte[] getAttachData() {
		return attachData;
	}


	public void setAttachData(byte[] attachData) {
		this.attachData = attachData;
	}


	 
	
	
}
